package com.yanlight.util;

import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogUtil {

    public static String TAG = "LogUtil";

    private static final Logger logger = LoggerFactory.getLogger(LogUtil.class);

    public static void showLog(Object object) {
        showLog(TAG, object);
    }

    public static void showLog(String tag, Object object) {
        logger.info("****************  " + tag + "  ****************");

        if (object instanceof String) {
            logger.info((String) object);
        } else {
            logger.info(JSONObject.toJSONString(object));
        }

        logger.info("*****************************************");
    }

}
